﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Libs.Content;
using System.Configuration;

public partial class Controls_Right_Clip : System.Web.UI.UserControl
{
    protected string urlYoutube = "";
    protected string urlImage = "";
    private List<NewsWeb> list = null;
    private NewsWeb newsWeb;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            BindData();
    }

    protected void BindData()
    {
        // 47 là ID của chuyên mục CLIP
        newsWeb = new NewsWeb();
        list = newsWeb.GetList(47, 0, 3);

        NewsWeb mainNews = list[0];
        urlYoutube = mainNews.SubTitle;
        urlImage = AppUtils.ImageUrl(mainNews.ImageUrl, "256", "144");
        hlTitle.InnerText = mainNews.Title;
        hlTitle.HRef = mainNews.Url;
        list.Remove(mainNews);

        rptNextVideo.DataSource = list;
        rptNextVideo.DataBind();

    }
}